
<?php   
echo $this->Html->script('jquery-1.7.1.js');
    echo ' <h2> '.$MonEvent[0]['ActionEvent']['title'].' </h2>
        <div class="eventInfo">
        <div id="pano"></div>
        <div class="eventInfo2">
            <h4>Description :</h4> <h5>'.$MonEvent[0]['ActionEvent']['description'].' </h5>
            <h4>Date :</h4><h5>'.$MonEvent[0]['ActionEvent']['eventDate'].' </h5>
               <h4>Adresse :</h4> <h5>'.$MonEvent[0]['ActionEvent']['adresse'].'</h5> </div>
                
';
    if ($action['Action']['id']==$MonEvent[0]['ActionEvent']['actions_id'])
    {
        echo $this->Html->link('Supprimer cette évènement', array('controller' => 'ActionEvents'
                                                      , 'action' => 'supp', $MonEvent[0]['ActionEvent']['id']
                                                      )
                    );
    }
    
?>

<script src="http://maps.google.com/maps?file=api&amp;v=2&amp;sensor=true&amp;key=ABQIAAAA9D-zqq9EKpegmTjeNx3bkBT2yXp_ZAY8_ufC3CFXhHIE1NvwkxRGjJAmrQpQMul-LWOUkYHCiwz3VA" type="text/javascript"></script>

    <script type="text/javascript">





    $(document).ready(function(){
      if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("map_canvas"));
        map.addControl(new GSmallMapControl()); 
        
            Geocoder = new GClientGeocoder();
            Geocoder.getLatLng('France', function(latlngFr) {
                if (latlngFr) map.setCenter(latlngFr,6);
             });
      }
        var myIcon = new GIcon(G_DEFAULT_ICON, "http://www.xn--icne-wqa.com/images/icones/2/1/circle_red.png");
        myIcon.iconSize = new GSize(15,15);
        myIcon.dragCrossSize = new GSize(15,15);

        myIcon.shadow = '';
        myIcon.iconAnchor = new GPoint(5,5);


addEvent('<?php echo($MonEvent[0]['ActionEvent']['adresse']);?>');
        

        function mapMarkLatLng (latLng, adress) {
            marker = new GMarker(latLng,{icon : myIcon,clickable: true, draggable: false, title: adress});
            map.addOverlay(marker);
            map.setCenter(latLng,15);

myPOV = {yaw:370.64659986187695,pitch:-20};
svOpts = {latlng:latLng, pov:myPOV};
var myPano = new GStreetviewPanorama(document.getElementById("pano"), svOpts)
            GEvent.addListener(marker, "click", function() {

            });

        }
        function mapMarkAdress (adress) {
            mapGeocoder = new GClientGeocoder();
            mapGeocoder.getLatLng(adress, function(latLng) {
                if (latLng) mapMarkLatLng(latLng, adress);
             });
         }
         function addEvent(event){
                mapMarkAdress(event);
         }
    });






   
    </script>
    </div>
    <div id="map_canvas" ></div>